
public class Stack {
	
	private LinkedListNode top;
	
	public LinkedListNode peek(){
		return top;
	}
	
	public boolean isEmpty(){
		return top == null ? true : false;
	}
	
	public void push(Object o){
		LinkedListNode n = new LinkedListNode((int)o);
		
		if(top == null) {
			top = n;
			return;
		}
		
		n.next = top;
		top = n;
	}
	
	public LinkedListNode pop(){
		if(top == null) return null;
		
		LinkedListNode n = top;
		top = top.next;
		return n;
	}
	
	
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
